package com.meiya.baseweb.entity;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

@Entity
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
public class Pubopinion extends BasicEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String Guid;// 唯一编号
	private String title;
	private String domain; // 领域
	private Integer recognizedTime;// 识别时间
	private Integer lastDays; // 持续时间段

	@OneToMany(cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER, mappedBy = "thePubopinion")
	private Set<Opinion> theOpinions;// 观点列表

	@OneToOne(cascade = { CascadeType.REFRESH }, fetch = FetchType.EAGER, mappedBy = "thePubopinion")
	private Fact theFact;// 事实

	
	public Fact getTheFact() {
		return theFact;
	}

	public void setTheFact(Fact theFact) {
		this.theFact = theFact;
	}

	public Set<Opinion> getTheOpinions() {
		return theOpinions;
	}

	public void setTheOpinions(Set<Opinion> theOpinions) {
		this.theOpinions = theOpinions;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public Integer getRecognizedTime() {
		return recognizedTime;
	}

	public void setRecognizedTime(Integer recognizedTime) {
		this.recognizedTime = recognizedTime;
	}

	public Integer getLastDays() {
		return lastDays;
	}

	public void setLastDays(Integer lastDays) {
		this.lastDays = lastDays;
	}

	public String getGuid() {
		return Guid;
	}

	public void setGuid(String guid) {
		Guid = guid;
	}
}
